const data = [];
for (let i = 0; i <= 100; i++) {
    let theta = (i / 100) * 360;
    let r = 5 * (1 + Math.sin((theta / 180) * Math.PI));
    data.push([r, theta]);
}
// 极坐标双数值轴
export const TwoValueAxesPolarOption = {
    title: {
        text: 'Two Value-Axes in Polar'
    },
    legend: {
        data: ['line']
    },
    polar: {},
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross'
        }
    },
    angleAxis: {
        type: 'value',
        startAngle: 0
    },
    radiusAxis: {},
    series: [
        {
            coordinateSystem: 'polar',
            name: 'line',
            type: 'line',
            data: data
        }
    ]
};

const dataFlower = [];
for (let i = 0; i <= 360; i++) {
    let t = (i / 180) * Math.PI;
    let r = Math.sin(2 * t) * Math.cos(2 * t);
    dataFlower.push([r, i]);
}

// 极坐标双数值轴
export const TwoValueAxesPolarFlowerOption = {
    title: {
        text: 'Two Value-Axes in Polar'
    },
    legend: {
        data: ['line']
    },
    polar: {
        center: ['50%', '54%']
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross'
        }
    },
    angleAxis: {
        type: 'value',
        startAngle: 0
    },
    radiusAxis: {
        min: 0
    },
    series: [
        {
            coordinateSystem: 'polar',
            name: 'line',
            type: 'line',
            showSymbol: false,
            data: dataFlower
        }
    ],
    animationDuration: 2000
};